#!/bin/bash

#
# Copyright (c) Vladimir Likic 2005-2011
#

source PATH_PARAMETERS
source RUN_PARAMETERS

# HMMCALIBRATE - increase the number of synthetic sequences
# for greater accuracy (default=5000)
HMM_CALIB_NPT=25000

for hmm_model in $(ls $HMM_MODELS)
do
  echo -ne " Working on $hmm_model\n"
  cat $HMM_MODELS/$hmm_model >> $HMM_LIB/$HMM_DBA
done

echo -ne "\n Calibrating the database\n\n"
$HMMCALIBRATE --num $HMM_CALIB_NPT $HMM_LIB/$HMM_DBA

echo -ne "\n Creating binary SSI index\n\n"
$HMMINDEX $HMM_LIB/$HMM_DBA

echo -ne "\n all done.\n\n"

